<style>
    .layui-iconpicker-body.layui-iconpicker-body-page .hide {
        display: none;
    }
</style>
<link rel="stylesheet" href="/static/plugs/lay-module/autocomplete/autocomplete.css?v={$version}" media="all">
<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">

        <!-- <div class="layui-form-item">
            <label class="layui-form-label required">保单PDF</label>
            <div class="layui-input-block layuimini-uploadpdf">
                <input name="file" class="layui-input layui-col-xs6" lay-verify="required" lay-reqtext="请上传文件" placeholder="请上传文件" value="">
                <div class="layuimini-uploadpdf-btn">
                    <span><a class="layui-btn" data-uploadpdf="file" data-uploadpdf-number="one" data-uploadpdf-exts="pdf"><i class="fa fa-upload"></i> 上传文件</a></span>
                    <span><a class="layui-btn" data-analysispdf="file">识别文件</a></span>
                </div>
            </div>
        </div> -->

        <div class="layui-form-item">
            <label class="layui-form-label required">保单PDF</label>
            <div class="layui-input-block layuimini-uploadpdf">
                <input name="files" class="layui-input layui-col-xs6" lay-verify="required" lay-reqtext="请上传文件" placeholder="请上传文件" value="{$row.files|default=''}">
                <div class="layuimini-uploadpdf-btn">
                    <div class="layui-upload-drag" style="display: block;" id="upload-drag" data-uploadpdf="files" data-uploadpdf-number="multiple" data-uploadpdf-exts="pdf">
                        <i class="layui-icon layui-icon-upload"></i> 
                        <div>点击上传，或将保单PDF文件拖拽到此处</div>
                    </div>
                    <!-- <span><a class="layui-btn" data-uploadpdf="files" data-uploadpdf-number="multiple" data-uploadpdf-exts="pdf"><i class="fa fa-upload"></i> 上传文件</a></span> -->
                    <span><a class="layui-btn" data-analysispdf="files">识别文件</a></span>
                </div>
            </div>
        </div>

        <!-- <div class="layui-form-item">
            <label class="layui-form-label">保险类型</label>
            <div class="layui-input-block">
                <input type="text" id="type" name="type" class="layui-input" lay-reqtext="请输入保险类型" placeholder="请输入保险类型" value="">
            </div>
        </div> -->

        <div class="layui-form-item">
            <label class="layui-form-label">保险公司</label>
            <div class="layui-input-block">
                <input type="text" id="company" name="company" class="layui-input" lay-reqtext="请输入保险公司" placeholder="请输入保险公司" value="{$row.company|default=''}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">商业保险单号</label>
            <div class="layui-input-block">
                <input type="text" id="policy_num_sy" name="policy_num_sy" class="layui-input" lay-reqtext="请输入保险单号" placeholder="请输入保险单号" value="{$row.policy_num_sy|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">交强保险单号</label>
            <div class="layui-input-block">
                <input type="text" id="policy_num_jq" name="policy_num_jq" class="layui-input" lay-reqtext="请输入保险单号" placeholder="请输入保险单号" value="{$row.policy_num_jq|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">驾乘保险单号</label>
            <div class="layui-input-block">
                <input type="text" id="policy_num_jc" name="policy_num_jc" class="layui-input" lay-reqtext="请输入保险单号" placeholder="请输入保险单号" value="{$row.policy_num_jc|default=''}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">商业险保费</label>
            <div class="layui-input-block">
                <input type="number" id="cost_sy" name="cost_sy" class="layui-input" lay-reqtext="请输入保险费" placeholder="请输入保险费" min="0" value="{$row.cost_sy|default='0'}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">交强险保费</label>
            <div class="layui-input-block">
                <input type="number" id="cost_jq" name="cost_jq" class="layui-input" lay-reqtext="请输入保险费" placeholder="请输入保险费" min="0" value="{$row.cost_jq|default='0'}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">车船税</label>
            <div class="layui-input-block">
                <input type="number" id="cost_cc" name="cost_cc" class="layui-input" lay-reqtext="请输入保险费" placeholder="请输入保险费" min="0" value="{$row.cost_cc|default='0'}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">驾乘险保费</label>
            <div class="layui-input-block">
                <input type="number" id="cost_jc" name="cost_jc" class="layui-input" lay-reqtext="请输入保险费" placeholder="请输入保险费" min="0" value="{$row.cost_jc|default='0'}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">被保险人</label>
            <div class="layui-input-block">
                <input type="text" id="insurer" name="insurer" lay-verify="required" class="layui-input" lay-reqtext="请输入被保险人" placeholder="请输入被保险人" value="{$row.insurer|default=''}">
            </div>
        </div>

        <!-- <div class="layui-form-item">
            <label class="layui-form-label">车主</label>
            <div class="layui-input-block">
                <input type="text" id="carowner" name="carowner" class="layui-input" lay-reqtext="请输入车主" placeholder="请输入车主" value="">
            </div>
        </div> -->

        <div class="layui-form-item">
            <label class="layui-form-label">号牌号码</label>
            <div class="layui-input-block">
                <input type="text" id="carno" name="carno" lay-verify="required" class="layui-input" lay-reqtext="请输入号牌号码" placeholder="请输入号牌号码" value="{$row.carno|default=''}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">出单日期</label>
            <div class="layui-input-block">
                <input type="text" data-date="" data-date-type="date" lay-verify="required" class="layui-input" id="create_at" name="create_at" placeholder="yyyy-MM-dd" value="{$row.create_at|default=''}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">商业险起止日期</label>
            <div class="layui-input-inline">
                <input type="text" data-date="" class="layui-input" id="start_at_sy" name="start_at_sy" placeholder="yyyy-MM-dd HH:mm:ss" value="{$row.start_at_sy|default=''}">
            </div>
            <div class="layui-input-inline">
                <input type="text" data-date="" class="layui-input" id="end_at_sy" name="end_at_sy" placeholder="yyyy-MM-dd HH:mm:ss" value="{$row.end_at_sy|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">交强险起止日期</label>
            <div class="layui-input-inline">
                <input type="text" data-date="" class="layui-input" id="start_at_jq" name="start_at_jq" placeholder="yyyy-MM-dd HH:mm:ss" value="{$row.start_at_jq|default=''}">
            </div>
            <div class="layui-input-inline">
                <input type="text" data-date="" class="layui-input" id="end_at_jq" name="end_at_jq" placeholder="yyyy-MM-dd HH:mm:ss" value="{$row.end_at_jq|default=''}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">代理</label>
            <div class="layui-input-block">
                <select id="sale_type" name="sale_type" lay-filter="sale_type" lay-verify="required" data-select="{:url('insurance.policy/getSaleType')}" data-fields="id,title" data-value="{$row.sale_type|default=''}">
                </select>
            </div>
        </div>

        <!-- <div id="sale_type_1" class="layui-form-item {if $row.sale_type != 1}layui-hide{/if}"> -->
        <div id="sale_type_1" class="layui-form-item">
            <label class="layui-form-label">代理人</label>
            <div class="layui-input-block">
                <input type="text" id="agent" name="agent" class="layui-input" lay-reqtext="请输入代理人" placeholder="请输入代理人" value="{$row.agent|default=''}">
            </div>
        </div>

        <div id="sale_type_3" class="layui-form-item">
            <label class="layui-form-label">代理厂</label>
            <div class="layui-input-block">
                <input type="text" id="agent_factory" name="agent_factory" class="layui-input" lay-reqtext="请输入代理厂" placeholder="请输入代理厂" value="{$row.agent_factory|default=''}">
                <!-- <select id="agent_factory" name="agent_factory" lay-verify="required" lay-reqtext="请选择代理厂">
                    <option value="">请选择</option>
                </select> -->
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">是否过户</label>
            <div class="layui-input-block">
                <select id="is_transfer_owner" name="is_transfer_owner" lay-verify="required" >
                    <option value="0" {if $row.is_transfer_owner == 0}selected{/if}>否</option>
                    <option value="1" {if $row.is_transfer_owner == 1}selected{/if}>是</option>
                </select>
            </div>
        </div>

        <div id="sale_type_3" class="layui-form-item">
            <label class="layui-form-label">续保</label>
            <div class="layui-input-block">
                <select id="is_renewal" name="is_renewal" lay-verify="required" lay-reqtext="请选择续保">
                    <option value="0" {if $row.is_renewal == 0}selected{/if}>否</option>
                    <option value="1" {if $row.is_renewal == 1}selected{/if}>是</option>
                </select>
            </div>
        </div>


        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">备注信息</label>
            <div class="layui-input-block">
                <textarea name="remark" class="layui-textarea" placeholder="请输入备注信息">{$row.remark|default=''}</textarea>
            </div>
        </div>

        <div id="input_hidden" class="layui-hide"> 
            <input type="hidden" name="is_driver_p" value="{$row.is_driver_p|default=''}">
            <input type="hidden" name="is_passenger_p" value="{$row.is_passenger_p|default=''}">   
            <input type="hidden" name="mobile" value="{$row.mobile|default=''}">
            <!-- <input type="hidden" name="create_at" value="{$row.create_at|default=''}"> -->
            <input type="hidden" name="idcard" value="{$row.idcard|default=''}">
            <input type="hidden" name="car_type" value="{$row.car_type|default=''}">
            <input type="hidden" name="third_party" value="{$row.third_party|default=''}">
            <input type="hidden" name="is_chesun" value="{$row.is_chesun|default=''}">
            <input type="hidden" name="file_sy" value="{$row.file_sy|default=''}">
            <input type="hidden" name="file_jq" value="{$row.file_jq|default=''}">
            <input type="hidden" name="file_jc" value="{$row.file_jc|default=''}">
            <input type="hidden" name="image_sy" value="{$row.image_sy|default=''}">
            <input type="hidden" name="image_jq" value="{$row.image_jq|default=''}">
            <input type="hidden" name="image_jc" value="{$row.image_jc|default=''}">
            <input type="hidden" name="ocr_json_sy" value="{$row.ocr_json_sy|default=''}">
            <input type="hidden" name="ocr_json_jq" value="{$row.ocr_json_jq|default=''}">
            <input type="hidden" name="ocr_json_jc" value="{$row.ocr_json_jc|default=''}">
            <input type="hidden" name="mine_data_sy" value="{$row.mine_data_sy|default=''}">
            <input type="hidden" name="mine_data_jq" value="{$row.mine_data_jq|default=''}">
            <input type="hidden" name="mine_data_jc" value="{$row.mine_data_jc|default=''}">
            <input type="hidden" name="p_type_sy" value="{$row.p_type_sy|default=''}">
            <input type="hidden" name="p_type_jq" value="{$row.p_type_jq|default=''}">
            <input type="hidden" name="p_type_jc" value="{$row.p_type_jc|default=''}">
        </div>

        <div class="hr-line"></div>
        <div class="layui-form-item text-center">
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>确认</button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
        </div>

    </form>
</div>